package cn.math.appmath.action;

import cn.math.appmath.biz.DownloadBiz;
import cn.math.appmath.biz.NoticBiz;
import cn.math.appmath.biz.TrenderBiz;
import cn.math.appmath.entity.Download;
import cn.math.appmath.entity.Notic;
import cn.math.appmath.entity.Trender;

import com.opensymphony.xwork2.ActionSupport;

import java.util.*;

public class IndexAction extends ActionSupport {
	private static final long serialVersionUID = -4565898601842133546L;
	List<Notic> notics1;
	List<Notic> notics2;
	List<Trender> trenders;
	List<Download> downloads;
	NoticBiz noticBiz;
	TrenderBiz trenderBiz;
	DownloadBiz downloadBiz;
	
	public String findTop() throws Exception{
		notics1 = noticBiz.findTop("1");
		notics2 = noticBiz.findTop("2");
		trenders = trenderBiz.findTop();
		downloads = downloadBiz.findTop();
		return SUCCESS;
	}
	
	public List<Notic> getNotics1() {
		return notics1;
	}
	public void setNotics1(List<Notic> notics1) {
		this.notics1 = notics1;
	}
	public List<Notic> getNotics2() {
		return notics2;
	}
	public void setNotics2(List<Notic> notics2) {
		this.notics2 = notics2;
	}
	public List<Trender> getTrenders() {
		return trenders;
	}
	public void setTrenders(List<Trender> trenders) {
		this.trenders = trenders;
	}

	public List<Download> getDownloads() {
		return downloads;
	}

	public void setDownloads(List<Download> downloads) {
		this.downloads = downloads;
	}

	public void setNoticBiz(NoticBiz noticBiz) {
		this.noticBiz = noticBiz;
	}

	public void setTrenderBiz(TrenderBiz trenderBiz) {
		this.trenderBiz = trenderBiz;
	}

	public void setDownloadBiz(DownloadBiz downloadBiz) {
		this.downloadBiz = downloadBiz;
	}
}
